package com.wn.pettyloan.controller;

import com.wn.pettyloan.entity.Bank;
import com.wn.pettyloan.service.BankService;
import com.wn.pettyloan.util.Result;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

/**
 * @author ：Morsera
 * @date ：Created in 2022/12/14 9:42
 * @description：
 */

@RestController
@RequestMapping("banks")
public class BankController {
    @Resource
    private BankService bankService;

    /**
     * @Description: 查询所有银行
     * @param
     * @return: com.wn.pettyloan.util.Result
     * @Author: Morsera
     * @Date: 2022/12/14 14:11
     */
    @GetMapping
    public Result selAll(){
        List<Bank> list = bankService.selAll();
        return Result.ok().data("list", list);
    }
}
